********************************************************
*													   *
*			4_mechanism_cotton_building_layout.do	   *
*													   *
********************************************************

/*  ================================  NOTES  ================================

+ PURPSOSE:
	
	In this do-file we use data on the building layout of cotton spinning mills 
	to show evidence of the reorganization hypothesis
	

+ Inputs: 

		* cotton_building_layout.dta
		

==============================  TOP MATTER ==============================*/
	

************** END HEADER **************

	*DATA
	global proc_data "`pdir'/data"
	global output "`pdir'/outputs/main_paper"

********************************** END HEADER **********************************


use "$proc_data/cotton_building_layout.dta", clear



********************************************************************************
************************************	FIGURES	 	****************************
********************************************************************************


************	Figure 4. ******************************************************

*** Mechanism: squarness and num floors 	***********
	
	
		*** Panel A: Num floors
		
		twoway (kdensity floors if early == 1, bwidth(1.1) lcolor(gs6) lpattern(dash) lwidth(thick)) (kdensity floors if early == 0, bwidth(0.6) lcolor(navy) lpattern(solid) lwidth(thick)),  legend( order(1 "Early Period" 2 "Mature Period") position(2) ring(0) cols(1))   ///
		 scheme(s1color) xtitle("Number of Floors", size(large)) ///
		ytitle("Kernel density", size(large)) xscale(range(0 7)) xlabel(0(1)7, labsize(medlarge) labgap(med)) ylabel(, labsize(medlarge)) 
	
		graph export "$output/Figures/Figure_4A.pdf", replace
		graph export "$output/Figures/Figure_4A.eps", replace
		
		*** Panel B: Squareness
	

		twoway (kdensity squareness if early == 1,  lcolor(gs6) lpattern(dash) lwidth(thick)) (kdensity squareness if early == 0, lcolor(navy) lpattern(solid) lwidth(thick)), legend( order(1 "Early Period" 2 "Mature Period") position(2) ring(0) cols(1))   ///
		 scheme(s1color) xtitle("Squareness", size(large)) ///
		ytitle("Kernel density", size(large)) xscale(range(0 1)) xlabel(0(0.2)1, labsize(medlarge) labgap(med)) ylabel(, labsize(medlarge)) 

		graph export "$output/Figures/Figure_4B.pdf", replace
		graph export "$output/Figures/Figure_4B.eps", replace		
		
		
		

